package com.uoss.webapp.foundation.action;

import javax.annotation.Resource;

import org.uoss.applications.framework.exception.BIZException;
import org.uoss.webapp.framework.struts2.action.PaginationAction;

import com.uoss.applications.modules.foundation.biz.IAgencyBIZ;
import com.uoss.applications.modules.foundation.entities.TcAgency;

public class AgencyAction extends PaginationAction<TcAgency> {
	private static final long serialVersionUID = -7943041335206360274L;
	@Resource
	private IAgencyBIZ agencyBIZ;
	
	public String listAgency(){
		return SUCCESS;
	}
	
	public String loadingAgency(){
		try {
			this.toJSONObject(this.getAgencyBIZ().getAgencyResultSetByPaging(this.getQueryModel()));
		} 
		catch (BIZException e) {
			e.printStackTrace();
		}
		return SUCCESS;
	}

	public void setAgencyBIZ(IAgencyBIZ agencyBIZ) {
		this.agencyBIZ = agencyBIZ;
	}

	public IAgencyBIZ getAgencyBIZ() {
		return agencyBIZ;
	}
}
